from common.httpclient import HttpClient
def getAuthorization(username='admin', password='macro123'):
    url = 'http://121.37.169.128:8201/mall-admin/admin/login'
    # 输入数据
    data = {'username': username, 'password': password}
    # 执行
    client = HttpClient()
    result = client.post(url=url, data=data)

    header = {'Authorization': result.data.get('tokenHead') + result.data.get('token')}
    return header
#
# header = getAuthorization()
# print(header)